package pl.kozulowski.string {
	
	public class StringUtils {
		
		public static function mutliSplit($str:String, $s1:String, $s2:String):Array {
			var temp1:Array = $str.split($s1);
			var temp2:Array = [];
			var i:int=0;
			for(i; i < temp1.length; i++) {
				temp2.push(temp1[i].split($s2));
			}
			return temp2;
		}
		
		public static function stripSpaces($str:String):String {
			var str:Array = $str.split(' ');
			return(str.join(''));
		}
		
		public static function countWords($str:String):int {
			var arr:Array = $str.split(' ');
			return arr.length;
		}
	}
}